<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let p1 = Promise.resolve(1110);
      // 如果传入的参数为 非Promise类型的对象，则返回的结果为成功promise对象
      // 如果传入的参数为 Promise 对象，则参数的结果决定了 resolve 的结果
      let p2 = Promise.resolve(
        new Promise((res, rej) => {
          // res('66');
          rej('error');
        })
      );
      console.log(p1);
      console.log(p2);
    </script>
  </body>
</html>
